package com.yingyi.mtw.base.util;

import java.util.ArrayList;
import java.util.List;

import weibo4j.http.Response;
import weibo4j.model.ShortUrl;
import weibo4j.model.ShortUrlWapper;
import weibo4j.model.WeiboException;
import weibo4j.org.json.JSONArray;
import weibo4j.org.json.JSONException;
import weibo4j.org.json.JSONObject;

/**
 *@ vid	string	视频ID
	tag	string	视频标签
	title	string	视频标题
	desc	string	视频描述
		img	string	视频截图
	mimg	string	视频截图(中)
	bimg	string	视频截图(大)
	chk_yn	string	y-通过审核，n-未通过审核
	totaltime	int64	视频总时长
	swf	string	视频播放地址
	code	int64	错误码,cod=0为成功
 * @author Administrator
 *
 */
public class Open56VideoInfo {
	private String vid;
	private String title;
	private String tag;
	private String desc;
	private String img;
	private String mimg;
	private String bimg;
	private String chk_yn;
	private String totaltime;
	private String swf;
	
	

	
	public Open56VideoInfo(JSONObject json){
	
	    try {
			vid = json.getString("vid");
			title=json.getString("title");
			tag= json.getString("tag");
			 desc= json.getString("desc");
			 img= json.getString("img");
			 mimg= json.getString("mimg");
			 bimg= json.getString("bimg");
			 chk_yn= json.getString("chk_yn");
			 totaltime= json.getString("totaltime");
			 swf= json.getString("swf");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		 
	}
	
	
	
	
	public static Open56VideoWapper InfoWapper(String s){
		JSONObject jsonWapper;
		try {
			jsonWapper = new JSONObject(s);
			JSONObject info = jsonWapper.getJSONObject("0");
			String code = jsonWapper.getString("code");
			return new Open56VideoWapper(new Open56VideoInfo(info),code);
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		} 
		
	}
	public String getVid() {
		return vid;
	}
	public void setVid(String vid) {
		this.vid = vid;
	}
	public String getTag() {
		return tag;
	}
	public void setTag(String tag) {
		this.tag = tag;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	public String getMimg() {
		return mimg;
	}
	public void setMimg(String mimg) {
		this.mimg = mimg;
	}
	public String getBimg() {
		return bimg;
	}
	public void setBimg(String bimg) {
		this.bimg = bimg;
	}
	public String getChk_yn() {
		return chk_yn;
	}
	public void setChk_yn(String chk_yn) {
		this.chk_yn = chk_yn;
	}
	public String getTotaltime() {
		return totaltime;
	}
	public void setTotaltime(String totaltime) {
		this.totaltime = totaltime;
	}
	public String getSwf() {
		return swf;
	}
	public void setSwf(String swf) {
		this.swf = swf;
	}




	public String getTitle() {
		return title;
	}




	public void setTitle(String title) {
		this.title = title;
	}
	
}
